/* model */
import Field from "@model/entity/Field";
/* util */
import { randomString } from 'pub-bbx-utils';

const FormCommoditySettingTitleNameField: Field = {
  defaultValue: null,
  displayName: "标题名称",
  fieldName: "titleName",
  formType: "text",
  guideProfessions: [],
  id: randomString(),
  isDelete: 0,
  isGuideData: false,
  isNull: 0,
  isSearch: 0,
  isSystem: 0,
  orderId: 0,
  maxlength: 100,
  placeHolder: "建议100字以内",
  setting: {},
}

const FormCommoditySettingDescriptionField: Field = {
  defaultValue: null,
  displayName: "描述内容",
  fieldName: "description",
  formType: "textarea",
  guideProfessions: [],
  id: randomString(),
  isDelete: 0,
  isGuideData: false,
  isNull: 1,
  isSearch: 0,
  isSystem: 0,
  orderId: 0,
  maxlength: 500,
  placeHolder: "请输入内容，最多500字",
  setting: {},
}

const FormCommoditySettingUploadField: Field = {
  defaultValue: null,
  displayName: "添加商品",
  fieldName: "source",
  formType: "",
  guideProfessions: [],
  id: randomString(),
  isDelete: 0,
  isGuideData: false,
  isNull: 0,
  isSearch: 0,
  isSystem: 0,
  orderId: 0,
  placeHolder: "最多添加 4 个商品，不可拖动排序",
  setting: {},
}

export {
  FormCommoditySettingTitleNameField,
  FormCommoditySettingDescriptionField,
  FormCommoditySettingUploadField
}

export default {
  FormCommoditySettingTitleNameField,
  FormCommoditySettingDescriptionField,
  FormCommoditySettingUploadField
}
